
/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package br.com.sna.view;

import br.com.sna.control.ProcedimentoActionControl;
import br.com.sna.model.dao.Procedimento;
import br.com.sna.model.service.ProcedimentoImplements;
import java.text.NumberFormat;
import java.util.List;
import javax.swing.JFormattedTextField;
import javax.swing.JOptionPane;
import javax.swing.JTable;
import javax.swing.ListSelectionModel;
import javax.swing.event.ListSelectionEvent;
import javax.swing.event.ListSelectionListener;
import javax.swing.table.DefaultTableModel;

/**
 *
 * @author ritacosta
 */
public class ProcedimentoFrm extends javax.swing.JFrame {

    /**
     * Creates new form Prestador
     */
    ProcedimentoActionControl procedimentoActionControl;
    public DefaultTableModel tmProcedimento = new DefaultTableModel(null, new String[]{"Id", "Nome", "Código"});
    private List<Procedimento> procedimentos;
    ProcedimentoImplements procedimentoImplements;
    private ListSelectionModel lsmProcedimento;

    public ProcedimentoFrm() {
        initComponents();
        procedimentoImplements = new ProcedimentoImplements();
        procedimentoActionControl = new ProcedimentoActionControl(this);

    }

    public void searchProcedimentos() {
        procedimentos = procedimentoImplements.listarProcedimento();
        mostrarProcedimentos(procedimentos);
    }

    public void mostrarProcedimentos(List<Procedimento> procedimentos) {
        while (tmProcedimento.getRowCount() < 0) {
            tmProcedimento.removeRow(0);
        }
        if (procedimentos.size() == 0) {
            JOptionPane.showMessageDialog(null, "Não foi encontrado nenhum registro!");
        } else {
            String[] campos = new String[]{null, null, null};
            for (int i = 0; i < procedimentos.size(); i++) {
                tmProcedimento.addRow(campos);
                tmProcedimento.setValueAt(procedimentos.get(i).getId(), i, 0);
                tmProcedimento.setValueAt(procedimentos.get(i).getNome(), i, 1);
                tmProcedimento.setValueAt(procedimentos.get(i).getCodigo(), i, 2);
            }
        }
    }

    public void tbProcedimentoLinhaSelecionada(JTable tb) {
        if (tb.getSelectedRow() != -1) {
            labelId.setText(String.valueOf(procedimentos.get(tb.getSelectedRow()).getId()));
            txtNomeProcedimento.setText(procedimentos.get(tb.getSelectedRow()).getNome());
            ftxtCodigo.setText(String.valueOf(procedimentos.get(tb.getSelectedRow()).getCodigo()));
        } else {
            labelId.setText("");
            txtNomeProcedimento.setText("");
            ftxtCodigo.setText("");
        }
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jTextField1 = new javax.swing.JTextField();
        jPanel1 = new javax.swing.JPanel();
        jPanel2 = new javax.swing.JPanel();
        Funcionário = new javax.swing.JLabel();
        jToolBar1 = new javax.swing.JToolBar();
        btIncluirProcedimento = new javax.swing.JButton();
        btPrepararAlterarProcedimento = new javax.swing.JButton();
        btExcluirProcedimento = new javax.swing.JButton();
        jSeparator1 = new javax.swing.JToolBar.Separator();
        btSalvarProcedimento = new javax.swing.JButton();
        btAlterarProcedimento = new javax.swing.JButton();
        btFinalizarProcedimento = new javax.swing.JButton();
        jPanel3 = new javax.swing.JPanel();
        jPanel4 = new javax.swing.JPanel();
        jLabel3 = new javax.swing.JLabel();
        jLabel4 = new javax.swing.JLabel();
        jLabel2 = new javax.swing.JLabel();
        labelId = new javax.swing.JLabel();
        txtNomeProcedimento = new javax.swing.JTextField();
        ftxtCodigo = new JFormattedTextField(NumberFormat.getNumberInstance());
        jPanel5 = new javax.swing.JPanel();
        jScrollPane1 = new javax.swing.JScrollPane();
        tbProcedimento = new javax.swing.JTable();
        jToolBar2 = new javax.swing.JToolBar();
        btPesquisarProcedimento = new javax.swing.JButton();
        btLimpar = new javax.swing.JButton();

        jTextField1.setText("jTextField1");

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
        setTitle("Procedimento");

        jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder(""));

        jPanel2.setBackground(new java.awt.Color(255, 255, 255));

        Funcionário.setFont(new java.awt.Font("Calibri", 0, 24)); // NOI18N
        Funcionário.setText("Procedimento");

        javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
        jPanel2.setLayout(jPanel2Layout);
        jPanel2Layout.setHorizontalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(Funcionário, javax.swing.GroupLayout.PREFERRED_SIZE, 155, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        jPanel2Layout.setVerticalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(Funcionário)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        jToolBar1.setRollover(true);

        btIncluirProcedimento.setText("Incluir");
        btIncluirProcedimento.setFocusable(false);
        btIncluirProcedimento.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        btIncluirProcedimento.setMaximumSize(new java.awt.Dimension(60, 35));
        btIncluirProcedimento.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        jToolBar1.add(btIncluirProcedimento);

        btPrepararAlterarProcedimento.setText("Modificar");
        btPrepararAlterarProcedimento.setFocusable(false);
        btPrepararAlterarProcedimento.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        btPrepararAlterarProcedimento.setMaximumSize(new java.awt.Dimension(60, 35));
        btPrepararAlterarProcedimento.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        jToolBar1.add(btPrepararAlterarProcedimento);

        btExcluirProcedimento.setText("Excluir");
        btExcluirProcedimento.setFocusable(false);
        btExcluirProcedimento.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        btExcluirProcedimento.setMaximumSize(new java.awt.Dimension(60, 35));
        btExcluirProcedimento.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        jToolBar1.add(btExcluirProcedimento);
        jToolBar1.add(jSeparator1);

        btSalvarProcedimento.setText("Salvar");
        btSalvarProcedimento.setEnabled(false);
        btSalvarProcedimento.setFocusable(false);
        btSalvarProcedimento.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        btSalvarProcedimento.setMaximumSize(new java.awt.Dimension(60, 35));
        btSalvarProcedimento.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        jToolBar1.add(btSalvarProcedimento);

        btAlterarProcedimento.setText("Alterar");
        btAlterarProcedimento.setEnabled(false);
        btAlterarProcedimento.setFocusable(false);
        btAlterarProcedimento.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        btAlterarProcedimento.setMaximumSize(new java.awt.Dimension(60, 35));
        btAlterarProcedimento.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        jToolBar1.add(btAlterarProcedimento);

        btFinalizarProcedimento.setText("Finalizar");
        btFinalizarProcedimento.setEnabled(false);
        btFinalizarProcedimento.setFocusable(false);
        btFinalizarProcedimento.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        btFinalizarProcedimento.setMaximumSize(new java.awt.Dimension(60, 35));
        btFinalizarProcedimento.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        jToolBar1.add(btFinalizarProcedimento);

        jPanel3.setBorder(javax.swing.BorderFactory.createTitledBorder(""));

        jPanel4.setBorder(javax.swing.BorderFactory.createTitledBorder("Insira dados para cadastro"));

        jLabel3.setText("Nome:");

        jLabel4.setText("Codigo:");

        jLabel2.setText("Id:");

        txtNomeProcedimento.setEnabled(false);

        ftxtCodigo.setEnabled(false);

        javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4);
        jPanel4.setLayout(jPanel4Layout);
        jPanel4Layout.setHorizontalGroup(
            jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel4Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel4)
                    .addComponent(jLabel2)
                    .addComponent(jLabel3))
                .addGap(21, 21, 21)
                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(txtNomeProcedimento)
                    .addGroup(jPanel4Layout.createSequentialGroup()
                        .addComponent(labelId, javax.swing.GroupLayout.PREFERRED_SIZE, 70, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(0, 120, Short.MAX_VALUE))
                    .addComponent(ftxtCodigo))
                .addContainerGap())
        );
        jPanel4Layout.setVerticalGroup(
            jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel4Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(jLabel2)
                    .addComponent(labelId, javax.swing.GroupLayout.DEFAULT_SIZE, 21, Short.MAX_VALUE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(txtNomeProcedimento, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel3))
                .addGap(21, 21, 21)
                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel4)
                    .addComponent(ftxtCodigo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(26, Short.MAX_VALUE))
        );

        javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
        jPanel3.setLayout(jPanel3Layout);
        jPanel3Layout.setHorizontalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel3Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jPanel4, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addContainerGap())
        );
        jPanel3Layout.setVerticalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel3Layout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(jPanel4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
        );

        jPanel5.setBorder(javax.swing.BorderFactory.createTitledBorder(""));

        tbProcedimento.setModel(tmProcedimento);
        tbProcedimento.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
        lsmProcedimento = tbProcedimento.getSelectionModel();
        lsmProcedimento.addListSelectionListener(new ListSelectionListener() {
            public void valueChanged(ListSelectionEvent e) {
                if(! e.getValueIsAdjusting()){
                    tbProcedimentoLinhaSelecionada(tbProcedimento);
                }
            }
        });
        jScrollPane1.setViewportView(tbProcedimento);

        javax.swing.GroupLayout jPanel5Layout = new javax.swing.GroupLayout(jPanel5);
        jPanel5.setLayout(jPanel5Layout);
        jPanel5Layout.setHorizontalGroup(
            jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel5Layout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 329, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(135, 135, 135))
        );
        jPanel5Layout.setVerticalGroup(
            jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel5Layout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 151, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(283, 283, 283))
        );

        jToolBar2.setRollover(true);

        btPesquisarProcedimento.setText("Listar Procedimentos");
        btPesquisarProcedimento.setFocusable(false);
        btPesquisarProcedimento.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        btPesquisarProcedimento.setMaximumSize(new java.awt.Dimension(120, 35));
        btPesquisarProcedimento.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        btPesquisarProcedimento.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btPesquisarProcedimentoActionPerformed(evt);
            }
        });
        jToolBar2.add(btPesquisarProcedimento);

        btLimpar.setText("Limpar");
        btLimpar.setFocusable(false);
        btLimpar.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        btLimpar.setMaximumSize(new java.awt.Dimension(120, 35));
        btLimpar.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        jToolBar2.add(btLimpar);

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jToolBar1, javax.swing.GroupLayout.PREFERRED_SIZE, 331, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jPanel5, javax.swing.GroupLayout.PREFERRED_SIZE, 354, Short.MAX_VALUE)
                    .addComponent(jToolBar2, javax.swing.GroupLayout.DEFAULT_SIZE, 354, Short.MAX_VALUE))
                .addContainerGap())
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jToolBar2, javax.swing.GroupLayout.DEFAULT_SIZE, 37, Short.MAX_VALUE)
                    .addComponent(jToolBar1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(jPanel5, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)
                    .addComponent(jPanel3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addGap(14, 14, 14))
        );

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void btPesquisarProcedimentoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btPesquisarProcedimentoActionPerformed
        searchProcedimentos();
    }//GEN-LAST:event_btPesquisarProcedimentoActionPerformed

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        /* Set the Nimbus look and feel */
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
         * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 
         */
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Windows".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(ProcedimentoFrm.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(ProcedimentoFrm.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(ProcedimentoFrm.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(ProcedimentoFrm.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>

        /* Create and display the form */
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new ProcedimentoFrm().setVisible(true);
            }
        });
    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JLabel Funcionário;
    private javax.swing.JButton btAlterarProcedimento;
    private javax.swing.JButton btExcluirProcedimento;
    private javax.swing.JButton btFinalizarProcedimento;
    private javax.swing.JButton btIncluirProcedimento;
    private javax.swing.JButton btLimpar;
    private javax.swing.JButton btPesquisarProcedimento;
    private javax.swing.JButton btPrepararAlterarProcedimento;
    private javax.swing.JButton btSalvarProcedimento;
    private javax.swing.JFormattedTextField ftxtCodigo;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JPanel jPanel3;
    private javax.swing.JPanel jPanel4;
    private javax.swing.JPanel jPanel5;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JToolBar.Separator jSeparator1;
    private javax.swing.JTextField jTextField1;
    private javax.swing.JToolBar jToolBar1;
    private javax.swing.JToolBar jToolBar2;
    private javax.swing.JLabel labelId;
    private javax.swing.JTable tbProcedimento;
    private javax.swing.JTextField txtNomeProcedimento;
    // End of variables declaration//GEN-END:variables

    public DefaultTableModel getTmProcedimento() {
        return tmProcedimento;
    }

    public void setTmProcedimento(DefaultTableModel tmProcedimento) {
        this.tmProcedimento = tmProcedimento;
    }

    public List<Procedimento> getProcedimentos() {
        return procedimentos;
    }

    public void setProcedimentos(List<Procedimento> procedimentos) {
        this.procedimentos = procedimentos;
    }

    public ListSelectionModel getLsmProcedimento() {
        return lsmProcedimento;
    }

    public void setLsmProcedimento(ListSelectionModel lsmProcedimento) {
        this.lsmProcedimento = lsmProcedimento;
    }

    public javax.swing.JButton getBtAlterarProcedimento() {
        return btAlterarProcedimento;
    }

    public void setBtAlterarProcedimento(javax.swing.JButton btAlterarProcedimento) {
        this.btAlterarProcedimento = btAlterarProcedimento;
    }

    public javax.swing.JButton getBtExcluirProcedimento() {
        return btExcluirProcedimento;
    }

    public void setBtExcluirProcedimento(javax.swing.JButton btExcluirProcedimento) {
        this.btExcluirProcedimento = btExcluirProcedimento;
    }

    public javax.swing.JButton getBtFinalizarProcedimento() {
        return btFinalizarProcedimento;
    }

    public void setBtFinalizarProcedimento(javax.swing.JButton btFinalizarProcedimento) {
        this.btFinalizarProcedimento = btFinalizarProcedimento;
    }

    public javax.swing.JButton getBtIncluirProcedimento() {
        return btIncluirProcedimento;
    }

    public void setBtIncluirProcedimento(javax.swing.JButton btIncluirProcedimento) {
        this.btIncluirProcedimento = btIncluirProcedimento;
    }

    public javax.swing.JButton getBtLimpar() {
        return btLimpar;
    }

    public void setBtLimpar(javax.swing.JButton btLimpar) {
        this.btLimpar = btLimpar;
    }

    public javax.swing.JButton getBtPesquisarProcedimento() {
        return btPesquisarProcedimento;
    }

    public void setBtPesquisarProcedimento(javax.swing.JButton btPesquisarProcedimento) {
        this.btPesquisarProcedimento = btPesquisarProcedimento;
    }

    public javax.swing.JButton getBtPrepararAlterarProcedimento() {
        return btPrepararAlterarProcedimento;
    }

    public void setBtPrepararAlterarProcedimento(javax.swing.JButton btPrepararAlterarProcedimento) {
        this.btPrepararAlterarProcedimento = btPrepararAlterarProcedimento;
    }

    public javax.swing.JButton getBtSalvarProcedimento() {
        return btSalvarProcedimento;
    }

    public void setBtSalvarProcedimento(javax.swing.JButton btSalvarProcedimento) {
        this.btSalvarProcedimento = btSalvarProcedimento;
    }

    public javax.swing.JFormattedTextField getFtxtCodigo() {
        return ftxtCodigo;
    }

    public void setFtxtCodigo(javax.swing.JFormattedTextField ftxtCodigo) {
        this.ftxtCodigo = ftxtCodigo;
    }

    public javax.swing.JLabel getLabelId() {
        return labelId;
    }

    public void setLabelId(javax.swing.JLabel labelId) {
        this.labelId = labelId;
    }

    public javax.swing.JTable getTbProcedimento() {
        return tbProcedimento;
    }

    public void setTbProcedimento(javax.swing.JTable tbProcedimento) {
        this.tbProcedimento = tbProcedimento;
    }

    public javax.swing.JTextField getTxtNomeProcedimento() {
        return txtNomeProcedimento;
    }

    public void setTxtNomeProcedimento(javax.swing.JTextField txtNomeProcedimento) {
        this.txtNomeProcedimento = txtNomeProcedimento;
    }

    
}
